// **********************************************************************
//
// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

// Ice version 3.3.1

package com.xiaonei.testprotobuf;

public final class PersonHelper
{
    public static void
    write(IceInternal.BasicStream __os, com.xiaonei.testprotobuf.TestProtobufProtos.Person __v)
    {
        if(!__v.isInitialized())
        {
            throw new Ice.MarshalException("type not fully initialized");
        }
        __os.writeByteSeq(__v.toByteArray());
    }

    public static com.xiaonei.testprotobuf.TestProtobufProtos.Person
    read(IceInternal.BasicStream __is)
    {
        com.xiaonei.testprotobuf.TestProtobufProtos.Person __v;
        try
        {
            __v = com.xiaonei.testprotobuf.TestProtobufProtos.Person.parseFrom(__is.readByteSeq());
        }
        catch(com.google.protobuf.InvalidProtocolBufferException __ex)
        {
            Ice.MarshalException __mex = new Ice.MarshalException();
            __mex.initCause(__ex);
            throw __mex;
        }
        return __v;
    }
}
